<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background-color: rgb(223, 222, 222);
        }
        .box{
            width: 200px;
            height: 200px;
            margin: 200px auto;
            background-color: #fff;
            transition: all .3s;
        }
        .box:hover{
            /* 向上平移4个像素 */
            transform: translateY(-4px);
            box-shadow: 0 0 10px rgba(0, 0, 0, .3);
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>